﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;

namespace MyDesktopMicroBlog
{
    public class MessageHelper
    {
        public static void ShowMessage(string message)
        {
            (Application.Current.MainWindow as MainWindow).tbStatus.SetCurrentValue(TextBlock.OpacityProperty, 1.0);
            (Application.Current.MainWindow as MainWindow).tbStatus.Text = message;
        }

        public static void ShowAndHideMessage(string message)
        {
            (Application.Current.MainWindow as MainWindow).tbStatus.Text = message;
            (Application.Current.MainWindow as MainWindow).myStoryBoard.Begin(
                (Application.Current.MainWindow as MainWindow).tbStatus
                );
        }
    }
}
